﻿@model DslamPort.Models.UserModel
<div class="container_12">       
    <div class="grid_12">            
        <div class="module">
                <h2 align="right"><span><a href="@Url.Action("Index", "User")">Quay lại</a></span></h2>                        
                <div class="module-body">
                @using (Html.BeginForm("EditCurrentUser", "User", FormMethod.Post, new { id = "EditCurrentUser" }))
                {                      
                    <div align="center">
                        <h3>SỬA THÔNG TIN NGƯỜI DÙNG</h3>
                        <div class="account_edit" align="center"> 
                            <img src="@Url.Content("~/Content/Body/Images/Body_Images/Edit_User.png")" width="12%" style="margin-bottom:5px"/>
                        </div>
                    </div>
                    if (TempData["msg"] != null)
                    {                            
                        <span class="notification n-error">@TempData["msg"]</span>
                    } 
                    <table> 
                    <div style="width:50%; text-align:center; float:left">     
                        <p align="center">
                            <label style="width:53%; text-align:left">Tên đăng nhập:</label>
                            <div class="tendangnhap" align="center" style="padding-left: 10px; width: 100%">
                            @Html.TextBoxFor(model => model.user_name, new { @name = "user_name", @class = "input-medium", @disabled = "disabled" }) 
                            @Html.HiddenFor(model => model.user_name)
                            <font color="red">(*)</font>
                            <label style="width:57%; text-align:left">
                            @Html.ValidationMessageFor(model => model.user_name) 
                            </label>
                            </div>                                            
                        </p>                            
                        <p align="center">
                            <label style="width:53%; text-align:left">Mật khẩu:</label>
                            <div class="tendangnhap" align="center" style="padding-left: 10px; width: 100%">
                            @Html.TextBoxFor(model => model.password, new { @name = "password", @class = "input-medium" })
                            <font color="red">(*)</font>
                            <label style="width:57%; text-align:left">
                            @Html.ValidationMessageFor(model => model.password)
                            </label>
                            </div>
                        </p>
                        <p align="center">
                            <label style="width:53%; text-align:left;">Đơn vị:</label>
                            @if (Model.donvi != null)
                            { 
                                @Html.DropDownListFor(x => x.quan_huyen_id, Model.donvi)                     
                            }                        
                        </p>
                        </div>
                    <div style="width:50%; text-align:center; float:left">
                        <p align="center">
                           <label style="width:53%; text-align:left">Trạng thái hoạt động:</label>
                            <select name="status">
                                <option value="1"  @(Model.status == "1" ? "selected" : "")>Bình thường</option>
                                <option value="0" @(Model.status == "0" ? "selected" : "")>Khóa</option>
                            </select>                        
                        </p>
                        <p align="center">
                            <label style="width:53%; text-align:left">Họ tên:</label>
                            @Html.TextBoxFor(model => model.ho_ten, new { @name = "ho_ten", @class = "input-medium" })                        
                        </p>
                        </div>
                    </table>
                    <div class="button" align="center">
                        <p style="width:26%; text-align:center" align="center">
                            <input class="submit-green" type="submit" value="Sửa" /> 
                            <input class="submit-gray" type="reset" value="Hủy" />
                        </p>
                    </div>  
                }
                </div> <!-- End .module-body -->
        </div>  <!-- End .module -->
        <div style="clear:both;"></div>
    </div> <!-- End .grid_12 --> 
    <div style="clear:both;"></div>
</div> <!-- End .container_12 -->

